Move GtkFileFilter docs inline
authorPavel Holejsovsky <pholejs@src.gnome.org>
Sat, 15 Jan 2011 13:50:50 +0000 (14:50 +0100)
committerPavel Holejsovsky <pholejs@src.gnome.org>
Mon, 17 Jan 2011 14:27:06 +0000 (15:27 +0100)
docs/reference/gtk/tmpl/.gitignore
docs/reference/gtk/tmpl/gtkfilefilter.sgml [deleted file]
gtk/gtkfilefilter.c
gtk/gtkfilefilter.h

index 1758fee30a008ff9ab53d6c3900276f36ff1dcc3..e7c14a5afa9a0736fa57ac295e76a097be49add4 100644 (file)
@@ -27,6 +27,7 @@ gtkeventbox.sgml
 gtkexpander.sgml
 gtkfeatures.sgml
 gtkfixed.sgml
+gtkfilefilter.sgml
 gtkhbox.sgml
 gtkiconview.sgml
 gtkimcontextsimple.sgml
diff --git a/docs/reference/gtk/tmpl/gtkfilefilter.sgml b/docs/reference/gtk/tmpl/gtkfilefilter.sgml
deleted file mode 100644 (file)
index 4f22a3c..0000000
+++ /dev/null
@@ -1,170 +0,0 @@
-<!-- ##### SECTION Title ##### -->
-GtkFileFilter
-
-<!-- ##### SECTION Short_Description ##### -->
-A filter for selecting a file subset
-
-<!-- ##### SECTION Long_Description ##### -->
-<para>
-A GtkFileFilter can be used to restrict the files being shown
-in a #GtkFileChooser. Files can be filtered based on their name
-(with gtk_file_filter_add_pattern()), on their mime type (with
-gtk_file_filter_add_mime_type()), or by a custom filter function
-(with gtk_file_filter_add_custom()). 
-</para>
-
-<para>
-Filtering by mime types handles aliasing and subclassing of mime
-types; e.g. a filter for text/plain also matches a file with mime 
-type application/rtf, since application/rtf is a subclass of 
-text/plain. Note that #GtkFileFilter allows wildcards for the 
-subtype of a mime type, so you can e.g. filter for image/*.
-</para>
-
-<para>
-Normally, filters are used by adding them to a #GtkFileChooser,
-see gtk_file_chooser_add_filter(), but it is also possible
-to manually use a filter on a file with gtk_file_filter_filter().
-</para>
-
-<!-- ##### SECTION See_Also ##### -->
-<para>
-#GtkFileChooser
-</para>
-
-<!-- ##### SECTION Stability_Level ##### -->
-
-
-<!-- ##### SECTION Image ##### -->
-
-
-<!-- ##### STRUCT GtkFileFilter ##### -->
-<para>
-The <structname>GtkFileFilter</structname> struct contains
-only private fields and should not be directly accessed.
-</para>
-
-
-<!-- ##### STRUCT GtkFileFilterInfo ##### -->
-<para>
-A <structname>GtkFileFilterInfo</structname> struct is used
-to pass information about the tested file to 
-gtk_file_filter_filter(). 
-</para>
-
-@contains: Flags indicating which of the following fields need
-  are filled
-@filename: the filename of the file being tested
-@uri: the URI for the file being tested
-@display_name: the string that will be used to display the file
-  in the file chooser
-@mime_type: the mime type of the file
-
-<!-- ##### ENUM GtkFileFilterFlags ##### -->
-<para>
-These flags indicate what parts of a #GtkFileFilterInfo struct
-are filled or need to be filled. 
-</para>
-
-@GTK_FILE_FILTER_FILENAME: the filename of the file being tested
-@GTK_FILE_FILTER_URI: the URI for the file being tested
-@GTK_FILE_FILTER_DISPLAY_NAME: the string that will be used to 
-  display the file in the file chooser
-@GTK_FILE_FILTER_MIME_TYPE: the mime type of the file
-
-<!-- ##### USER_FUNCTION GtkFileFilterFunc ##### -->
-<para>
-The type of function that is used with custom filters,
-see gtk_file_filter_add_custom().
-</para>
-
-@filter_info: a #GtkFileFilterInfo that is filled according
-  to the @needed flags passed to gtk_file_filter_add_custom()
-@data: user data passed to gtk_file_filter_add_custom()
-@Returns: %TRUE if the file should be displayed
-
-
-<!-- ##### FUNCTION gtk_file_filter_new ##### -->
-<para>
-
-</para>
-
-@void: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gtk_file_filter_set_name ##### -->
-<para>
-
-</para>
-
-@filter: 
-@name: 
-
-
-<!-- ##### FUNCTION gtk_file_filter_get_name ##### -->
-<para>
-
-</para>
-
-@filter: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gtk_file_filter_add_mime_type ##### -->
-<para>
-
-</para>
-
-@filter: 
-@mime_type: 
-
-
-<!-- ##### FUNCTION gtk_file_filter_add_pattern ##### -->
-<para>
-
-</para>
-
-@filter: 
-@pattern: 
-
-
-<!-- ##### FUNCTION gtk_file_filter_add_pixbuf_formats ##### -->
-<para>
-
-</para>
-
-@filter: 
-
-
-<!-- ##### FUNCTION gtk_file_filter_add_custom ##### -->
-<para>
-
-</para>
-
-@filter: 
-@needed: 
-@func: 
-@data: 
-@notify: 
-
-
-<!-- ##### FUNCTION gtk_file_filter_get_needed ##### -->
-<para>
-
-</para>
-
-@filter: 
-@Returns: 
-
-
-<!-- ##### FUNCTION gtk_file_filter_filter ##### -->
-<para>
-
-</para>
-
-@filter: 
-@filter_info: 
-@Returns: 
-
-
index 04f3c55cf7c013ab55ae690f6a5a6f7f25138f1a..cdfb6cbedffbff94db23e8dc04453018dc850907 100644 (file)
  * Boston, MA 02111-1307, USA.
  */
 
+/**
+ * SECTION:gtkfilefilter
+ * @Short_description: A filter for selecting a file subset
+ * @Title: GtkFileFilter
+ *
+ * A GtkFileFilter can be used to restrict the files being shown in a
+ * #GtkFileChooser. Files can be filtered based on their name (with
+ * gtk_file_filter_add_pattern()), on their mime type (with
+ * gtk_file_filter_add_mime_type()), or by a custom filter function
+ * (with gtk_file_filter_add_custom()).
+ *
+ * Filtering by mime types handles aliasing and subclassing of mime
+ * types; e.g. a filter for text/plain also matches a file with mime
+ * type application/rtf, since application/rtf is a subclass of
+ * text/plain. Note that #GtkFileFilter allows wildcards for the
+ * subtype of a mime type, so you can e.g. filter for image/<!---->*.
+ *
+ * Normally, filters are used by adding them to a #GtkFileChooser,
+ * see gtk_file_chooser_add_filter(), but it is also possible
+ * to manually use a filter on a file with gtk_file_filter_filter().
+ *
+ * @see_also: #GtkFileChooser
+ */
+
 #include "config.h"
 #include <string.h>
 
index 7a848e51a562d2be596f8674b97ae60fbafccf22..c566ef17a8ed66c7751cfbe71b1f8636bb410264 100644 (file)
@@ -36,6 +36,17 @@ G_BEGIN_DECLS
 typedef struct _GtkFileFilter     GtkFileFilter;
 typedef struct _GtkFileFilterInfo GtkFileFilterInfo;
 
+/**
+ * GtkFileFilterFlags:
+ * @GTK_FILE_FILTER_FILENAME: the filename of the file being tested
+ * @GTK_FILE_FILTER_URI: the URI for the file being tested
+ * @GTK_FILE_FILTER_DISPLAY_NAME: the string that will be used to 
+ *   display the file in the file chooser
+ * @GTK_FILE_FILTER_MIME_TYPE: the mime type of the file
+ * 
+ * These flags indicate what parts of a #GtkFileFilterInfo struct
+ * are filled or need to be filled. 
+ */
 typedef enum {
   GTK_FILE_FILTER_FILENAME     = 1 << 0,
   GTK_FILE_FILTER_URI          = 1 << 1,
@@ -43,9 +54,33 @@ typedef enum {
   GTK_FILE_FILTER_MIME_TYPE    = 1 << 3
 } GtkFileFilterFlags;
 
+/**
+ * GtkFileFilterFunc:
+ * @filter_info: a #GtkFileFilterInfo that is filled according
+ *   to the @needed flags passed to gtk_file_filter_add_custom()
+ * @data: user data passed to gtk_file_filter_add_custom()
+ *
+ * The type of function that is used with custom filters, see
+ * gtk_file_filter_add_custom().
+ *
+ * @Returns: %TRUE if the file should be displayed
+ */
 typedef gboolean (*GtkFileFilterFunc) (const GtkFileFilterInfo *filter_info,
                                       gpointer                 data);
 
+/**
+ * GtkFileFilterInfo:
+ * @contains: Flags indicating which of the following fields need
+ *   are filled
+ * @filename: the filename of the file being tested
+ * @uri: the URI for the file being tested
+ * @display_name: the string that will be used to display the file
+ *   in the file chooser
+ * @mime_type: the mime type of the file
+ *
+ * A #GtkFileFilterInfo struct is used to pass information about the
+ * tested file to gtk_file_filter_filter().
+ */
 struct _GtkFileFilterInfo
 {
   GtkFileFilterFlags contains;